1. Field of the Invention
The present invention relates to report generation for databases, and in particular, to SQL (structured query language) scripts in report generation.
2. Description of the Related Art
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Report generation is a common task in database applications, for example to perform business intelligence activities. Reports may be generated according to a schedule for business managers to use when making business decisions. Thus a particular report may be developed once, and may be run as desired to produce a report according to the latest data in the database. A report generally includes formatting instructions and SQL (structured query language) scripts; the SQL scripts select the appropriate data from the database, and the formatting instructions format the results of the SQL scripts in a desired manner.
In general, the database applications are executed by an application server and the data is stored in a database implemented by a database server. A particular database application (or set of applications) may be configured to interface with various types of database servers (or database systems). More specifically, a particular database server (or database system) may have its own specific implementation of SQL (“native SQL”); the database applications may be written using SQL that is not specific to a particular implementation (“open SQL”), and may then use an interface to translate the open SQL into the native SQL.
As an example, the NetWeaver system from SAP AG implements the ABAP (Advanced Business Application Programming) language for database applications and reports. The NetWeaver system may use a number of database systems, including IBM DB2, Informix, MaxDB, Oracle, and Microsoft SQL Server. Thus for a specific NetWeaver system that uses an Oracle database, the NetWeaver system includes an interface for translating the open SQL of ABAP programs into the native SQL implemented by the Oracle database.
A new type of database interface introduced recently is Java™ Database Connectivity (JDBC). In order to implement the functionality of existing database applications with new database systems that use JDBC, one approach is to rewrite the existing database applications (e.g., the SQL scripts) to use JDBC instead.